Word processing involves the creation, editing, storage, and output of textual documents. Word processing is frequently performed using a general-purpose digital computer, executing an applications program having word processing function. Such a general purpose computer may be anything from a large mainframe connected to hundreds of individual terminals, to a stand alone personal computer. Word processing may also be performed using single-purpose electronic word processing devices. As used herein, the term "word processor" shall encompass any of the above implementations.
One of the major tasks of any word processor is to format the document for output. Output can take many forms, but most frequently output will be either printed on paper or displayed on a computer screen.
When formatting a document for output, the word processor must determine where to end each line of text. Typically, a user will input parameters such as the location of margins, size of font, whether or not to hyphenate, etc., and the word processor will automatically determine where to end each line based on these parameters. Most word processors follow a simple "maximum fit" algorithm, attempting to cram as much as possible onto each line before going on to the next line. I.e., they sequentially examine each line of text, attempting to fit as many words or word segments as possible on the current line consistent with the formatting parameters. Once the determination is made with respect to a line, the formatter moves on to the next line. The formatter never reconsiders the formatting of a previous line. If hyphenation is specified by the user, the word processor will attempt to place a portion of the word on the current line if the entire word will not fit.
The maximum fit algorithm may be implemented in any of several ways. If full left/right justification is used, the fit may be determined initially assuming a minimum spacing between words, which is then expanded as necessary to fill available space. Alternatively, the fit may be determined initially assuming a nominal word spacing, which may be reduced by no more than a predetermined amount if doing so will make it possible to squeeze the last word segment onto the line, or expanded if the final segment will not fit in any case. Where ragged right justification is used, the nominal word spacing will typically be used, which is not subsequently modified.
The "maximum fit" algorithm described above has the advantage of formatting the output in the fewest possible number of lines (given the constraints of margins, fonts, etc.). However, it can lead to undesirably formatted output.
The problems with the "maximum fit" algorithm are particularly acute where full left/right justification is specified, and the column width (between margins) is relatively narrow. This is, for example, the norm used by newspapers and magazines. Where full justification is used, the amount of space between each word is adjusted in order to make each line of words exactly the same length. Sometimes, the amount of extra space is so great that letterspacing is required, i.e., small spaces must be placed between individual letters. Letterspacing gives the formatted output a strange appearance, and can make it more difficult to read. Letterspacing can be reduced if hyphenation is used, but excessive hyphenation can also make the output difficult to read.
Readability can be improved if hyphenation is prohibited. However, this causes the textual material to occupy a larger number of lines. In a newspaper and many other applications, space is at such a premium that this is generally considered an unacceptable solution.
This use of letterspacing and/or excessive hyphenation is now so familiar to most people that it has become accepted as a necessary annoyance that any newspaper reader has to put up with. However, an unrecognized need exists for improved general readability and appearance of newspapers and other formatted documents, without use of additional document space or reduction in type size. The present invention is directed toward this goal.